<template>
  <view>
    <!-- <u-toast ref="uToast"></u-toast> -->
    <u-cell-group>
      <!-- <u-cell-item title="头像" :arrow="false">
				<u-avatar slot="right-icon" :src="avatar" show-level level-icon="camera" :size="76"></u-avatar>
			</u-cell-item> -->
      <u-cell-item
        title="代理商名称"
        :value="info.userName"
        :arrow="false"
        bg-color="white"
      ></u-cell-item>
      <u-cell-item
        title="代理商编号"
        :value="info.agentNo"
        :arrow="false"
        bg-color="white"
      ></u-cell-item>
      <!-- <u-cell-item title="实名认证" :value=" info.idCardNo.substring(0, 5) + '********' + info.idCardNo.substring(info.idCardNo.length - 5) " :arrow="false" bg-color="white" ></u-cell-item> -->
      <u-cell-item
        title="实名认证"
        :value="info.idCardNo"
        :arrow="false"
        bg-color="white"
      ></u-cell-item>
      <u-cell-item
        title="手机号"
        :value="info.mobileNo"
        :arrow="false"
        bg-color="white"
      ></u-cell-item>
      <u-cell-item
        class="mt-20"
        title="收益配置"
        :arrow="true"
        bg-color="white"
        @click="goCost()"
      ></u-cell-item>
      <u-cell-item
        title="返现配置"
        :arrow="true"
        bg-color="white"
        @click="goReturn()"
      ></u-cell-item>
    </u-cell-group>
  </view>
</template>

<script>
// import { uploadBaseUrl } from '@/config.js';
export default {
  data() {
    return {
      info: {},
      agentPolicyCostInfo: [],
      agentActivityInfoVos: [],
    };
  },
  computed: {
    avatar() {},
  },
  created() {
    this.getUserInfo();
  },
  methods: {
    // 获取个人信息列表
    getUserInfo() {
      this.$zx.user_api.queryMyInfo().then((data) => {
        console.log('queryMyInfo----->37', data);
        this.info = data.agentInfoDo;
        this.agentActivityInfoVos = data.agentActivityInfo;
        this.agentPolicyCostInfo = data.agentPolicyCost;
      });
    },
    goCost() {
      this.$u.route({
        url: 'pages/main/agent/agentCostAllocationDetailPerson',
        // params: {
        //   agentPolicyCostInfo: encodeURIComponent(
        //     JSON.stringify(this.agentPolicyCostInfo)
        //   ),
        // },
      });
    },
    goReturn() {
      this.$u.route({
        url: 'pages/main/agent/agentAddReappearanceAllocationMoneyPerson',
        // params: {
        //   agentPolicyCostInfo: encodeURIComponent(
        //     JSON.stringify(this.agentActivityInfoVos)
        //   ),
        // },
      });
    },
  },
};
</script>

<style lang="scss">
page {
  background-color: #f5f5f5;
}
</style>
